package com.hzhq.contract.demo;

import java.util.ArrayList;
import java.util.List;

/**
 * @author: hzhq1255
 * @mail: hzhq1255@163.com
 * @date: 2021/4/21 16:34
 * @desc:
 */
public class StringTest {


    public static void main(String[] args) {
        List<String> strings = new ArrayList<>();
        strings.add("test1");
        strings.add("test2");
        strings.add("test3");
        StringBuilder test = new StringBuilder();
        for(String s: strings){
            test.append(s).append(",").append('\n');
        }
        test.delete(test.lastIndexOf(","),test.length());

        System.out.println(test);
    }
}
